package com.group9.handinhand.service;

import java.util.ArrayList;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.group9.handinhand.service.so.OfferSO;
import com.group9.handinhand.service.so.RequestPostSO;
import com.group9.handinhand.service.so.RequestResponseSO;
import com.group9.handinhand.service.so.RequestSO;
import com.group9.handinhand.service.so.UserSO;
import com.group9.handinhand.service.so.UserTagSO;
/**
 * 
 * Interface that defines request service.
 *
 */
public interface RequestService {
	
	static final Logger logger = LoggerFactory.getLogger(RequestService.class);

	public RequestSO saveRequest(RequestSO so, UserSO user, Long communityId);

	public RequestSO getRequestById(Long requestId);
	
	public List<RequestSO> getRespondedRequestsByUser(UserSO user);
	
	public List<RequestSO> getModeratedRequestsByUser(UserSO user);
	
	public RequestPostSO saveRequestPost(Long requestId,Long userId, String post);

	public RequestResponseSO saveRequestResponse(RequestSO request, Long id, int goodsAmount);

	public ArrayList<RequestResponseSO> getRequestResponsesByUserIdAndRequestId(Long userId, Long requestId);
	
	public List<UserSO> getModeratorsByRequestId(Long requestId);
	
	public void updateRequest(RequestSO request);

	public RequestSO getModeratedRequestByRequestIdAndUserId(Long requestId, Long userId);
	
	public List<RequestSO> getRequestsByTag(UserTagSO tag);
	public List<RequestSO> getRequestsByTagName(String keyword);
	public List<RequestSO> getRequestsByName(String keyword);

}